﻿using EntityModel.CommodityMent;
using EntityModel.PageListInfor;
using System.Collections.Generic;
using System.Data;
using System.Threading.Tasks;

namespace IServices.IGoodsConfig
{
    /// <summary>
    /// 商品分类接口
    /// </summary>
    public interface IGoodsCats
    {
        /// <summary>
        /// 获取商品分类列表
        /// </summary>
        /// <returns></returns>
        Task<IEnumerable<AikeApplet_goods_cats>> GetAllGoodsCatsAsync();

        /// <summary>
        /// 通过商品分类id获取数据
        /// </summary>
        /// <param name="catId">商品分类id</param>
        /// <returns></returns>
        Task<AikeApplet_goods_cats> GetGoodsCatsDataByCatsidAsync(int catId);

        /// <summary>
        /// 通过sql获取父级信息
        /// </summary>
        /// <returns></returns>
        Task<DataTable> GetParentInfomationBySql();

        /// <summary>
        /// 获取商品分类分页列表数据
        /// </summary>
        /// <param name="goods_Cats"></param>
        /// <returns></returns>
        Task<DbQueryResult> GetGoodsCatsPageListAsync(AikeApplet_goods_cats goods_Cats);

        /// <summary>
        /// 添加商品分类
        /// </summary>
        /// <param name="goods_Cats">商品分类数据集</param>
        /// <returns></returns>
        Task<int> AddGoodsCatsInforAsync(AikeApplet_goods_cats goods_Cats);

        /// <summary>
        /// 修改商品分类
        /// </summary>
        /// <param name="goods_Cats">商品分类数据集</param>
        /// <returns></returns>
        Task<bool> UpdateGoodsCatsInforAsync(AikeApplet_goods_cats goods_Cats);

        /// <summary>
        /// 删除商品分类
        /// </summary>
        /// <param name="catId">商品分类id</param>
        /// <returns></returns>
        Task<bool> DeletedGoodsCatsInforAsync(AikeApplet_goods_cats catId);
    }
}
